package com.spsy.pay.contorller.mq;

import com.alibaba.fastjson2.JSON;
import com.spsy.common.core.domain.R;
import com.spsy.pay.canstand.RabbitMqCanstand;
import com.spsy.pay.domain.PaymentOrder;
import com.spsy.pay.order.WeiXinUtil;
import com.spsy.pay.vo.CreateOrderVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author: liuzhiping
 * @date: 2025/6/9 15:44
 **/
@Slf4j
@RestController
@RequestMapping("/mq")
public class RabbitMqController {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    @GetMapping("/send")
    public R send() throws Exception{

        log.info("-----参数-----");

        this.rabbitTemplate.convertAndSend(RabbitMqCanstand.EXCHANGE_NAME,RabbitMqCanstand.ROTEING_KEY_NAME,"2210a----");

        log.info("-----参数-----2222");

        return R.ok();
    }
}
